package com.hqyj.demo.entity;


import lombok.Data;

import java.io.Serializable;

/**
 * id	int	主键id
 * code	varchar	商品编号
 * model	varchar	商品型号
 * name	varchar	商品名称
 * num	int	商品数量
 * price	float	商品单价
 * total	float	商品总金额
 * unit	varchar	计量单位
 * purchase_list_id	int	单据id
 * type_id	int	所属类型id
 * goods_id	int	商品id
 */

@Data
public class PurchaseGoods implements Serializable {

    //主键id
    private Integer id;

    //商品编号
    private String code;

    //商品型号
    private String model;

    //商品名称
    private String name;

    //商品数量
    private Integer number;

    //商品单价
    private Float price;

    //商品总金额
    private Float total;

    //计量单位
    private String unit;

    //入库单据id
    private Integer purchaseId;

    //商品类型id
    private Integer typeId;
    //类型对象
    private Goodstype goodstype;

    //商品id
    private Integer goodsId;
    //商品对象
    private Goods goods;

    @Override
    public String toString() {
        return "PurchaseGoods{" +
                "id=" + id +
                ", code='" + code + '\'' +
                ", model='" + model + '\'' +
                ", name='" + name + '\'' +
                ", number=" + number +
                ", price=" + price +
                ", total=" + total +
                ", unit='" + unit + '\'' +
                ", purchaseId=" + purchaseId +
                ", typeId=" + typeId +
                ", goodstype=" + goodstype +
                ", goodsId=" + goodsId +
                ", goods=" + goods +
                '}';
    }

    public PurchaseGoods() {
    }

    public PurchaseGoods(Integer id, String code, String model, String name, Integer number, Float price, Float total, String unit, Integer purchaseId, Integer typeId, Integer goodsId) {
        this.id = id;
        this.code = code;
        this.model = model;
        this.name = name;
        this.number = number;
        this.price = price;
        this.total = total;
        this.unit = unit;
        this.purchaseId = purchaseId;
        this.typeId = typeId;
        this.goodsId = goodsId;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public Float getTotal() {
        return total;
    }

    public void setTotal(Float total) {
        this.total = total;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Integer getPurchaseId() {
        return purchaseId;
    }

    public void setPurchaseId(Integer purchaseId) {
        this.purchaseId = purchaseId;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public Goodstype getGoodstype() {
        return goodstype;
    }

    public void setGoodstype(Goodstype goodstype) {
        this.goodstype = goodstype;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }
}
